using System.IO;
using System;

namespace ConwayPLinq 
{
    public class MainClass 
    {
	public static void Main(string[] args)
	{
	    IBoard initial;
	    using (var file = File.OpenRead(args[0]))
		{
		    initial = LifeParser.Parse(file);
		}
	    
	    for(int j = 0; j < initial.Height; ++j)
		{
		    for(int i = 0; i < initial.Width; ++i)
			{
			    Console.Write(initial.GetCellState(i,j)?"Y":" ");
			}
		    Console.WriteLine();
		}
	}
    }
}